﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TXTD.Admin.Data.Entitys.System;
using TXTD.Admin.Model.Core;
using TXTD.Admin.Model.Modules.System;
using TXTD.Admin.Model.Paging;

namespace TXTD.Admin.Interface.System
{
    public interface ISysUserService : IBaseService<SysUser>
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        ResultModel Login(LoginModel user);
        /// <summary>
        /// 刷新token
        /// </summary>
        /// <param name="resultToken"></param>
        /// <returns></returns>
        ResultTokenModel RefreshToken(ResultTokenModel resultToken);
        /// <summary>
        /// 获取登录用户信息
        /// </summary>
        /// <returns></returns>
        object GetUserInfo();
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <returns></returns>
        PageResult<SysUserModel> GetPageList(SysUser model);
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Add(SysUser model);
        /// <summary>
        /// 修改数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Update(SysUser model);
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteById(string id);
        /// <summary>
        /// 修改启用状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int UpdateEnabled(SysUser model);
        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int ResetPassword(SysUser model);
    }
}
